project(MarketService)

# 添加Common库的包含路径
include_directories(${CMAKE_SOURCE_DIR})

# 添加子目录
add_subdirectory(src)

# 为Linux添加systemd服务文件
if(UNIX)
    configure_file(
        ${CMAKE_CURRENT_SOURCE_DIR}/scripts/${PROJECT_NAME}.service.in
        ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.service
        @ONLY
    )
    
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.service
        DESTINATION lib/systemd/system
    )
endif()